package com.yunhan.redis;

/**
 * redis常量key
 */
public interface RedisConstants {
    String PREFIX = "admin:";

    /**
     * 构建key
     *
     * @param key
     * @param args
     * @return
     */
    static String buildKey(String key, Object... args) {
        return String.format(key, args);
    }


    //常规的缓存key
    interface Key {

        /**
         * 用户信息缓存key1    %s-uid，%s-token
         */
        String USER_TOKEN_KEY1 = PREFIX + "token:%s:key1:%s";

        /**
         * 用户信息缓存key2  %s-uid，%s-token
         */
        String USER_TOKEN_KEY2 = PREFIX + "token:%s:key2:%s";

    }






}
